#pragma once
#include "afxwin.h"
#include "afxcmn.h"

#include "ServerSystem/ServerSystem.h"
#include <vector>


// CExamInformation dialog

class CExamInformation : public CDialog
{
    DECLARE_DYNAMIC(CExamInformation)

public:
    CExamInformation(CWnd* pParent = NULL);   // standard constructor
    virtual ~CExamInformation();

// Dialog Data
    enum { IDD = IDD_ExamInformation };

protected:
    CEdit m_editExamIdentity;
    CEdit m_editExamStartTime;
    CEdit m_editExamTotalTime;
    int m_iSelection;
    double m_dExamTotalTime;
    CEdit m_editQuestionCount;
    bool m_flagEditingQuestionCoef;
    CListCtrl m_listQuestionTypes;
    CListCtrl m_listQuestions;

    ExamSystem::QuestionType m_currentType;
    std::vector<ExamSystem::QuestionBase> m_questions[ExamSystem::QuestionTypeCount];
    std::vector<int> m_specifiedQuestions[ExamSystem::QuestionTypeCount];

    void QuestionTypeChanged(void);
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
protected:
    virtual void OnOK();
public:
    afx_msg void OnBnClickedRadioRamdom();
    afx_msg void OnBnClickedRadioSpecified();
    afx_msg void OnNMClickListQuestions(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnNMClickListQuestiontypes(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnEnChangeEditQuestioncount();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    afx_msg void OnEnKillfocusEditQuestioncount();
};
